import { request } from "@/utils/service"

// 库存表
/** 增 */
export function createApi(data: any) {
  return request({
    url: "inventory",
    method: "post",
    data
  })
}

/** 查 */
export function getApi(params: any) {
  return request<any>({
    url: "inventory",
    method: "get",
    params
  })
}

/** 查详情 */
export function getDetailApi(id: string) {
  return request<any>({
    url: `inventory/${id}`,
    method: "get"
  })
}

/** 修改 */
export function updateApi(data: any) {
  return request({
    url: `inventory/${data.id}`,
    method: "put",
    data
  })
}
